package com.cloudkinto.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 入库认领主表
 * </p>
 *
 * @author long
 * @since 2024-11-18
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("t_claim")
public class ClaimDo extends Model<ClaimDo> {

    private static final long serialVersionUID = 1L;

    /**
     * 认领单id
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 租户id
     */
    @TableField(value = "tenant_id", fill = FieldFill.INSERT)
    private Long tenantId;

    /**
     * 仓库id
     */
    @TableField(value = "wh_id", fill = FieldFill.INSERT)
    private Long whId;

    /**
     * 客户id
     */
    @TableField(value = "company_id", fill = FieldFill.INSERT)
    private Long companyId;

    /**
     * 认领客户
     */
    @TableField("claim_company_id")
    private Long claimCompanyId;

    /**
     * 认领单号
     */
    @TableField("claim_no")
    private String claimNo;

    /**
     * 关联单号
     */
    @TableField("link_no")
    private String linkNo;

    /**
     * 物流跟踪号
     */
    @TableField("tracking_number")
    private String trackingNumber;

    /**
     * 操作类型 1直接创建 2拆包清点
     */
    @TableField("operate_type")
    private Integer operateType;

    /**
     * 认领类型 1退件单-产品库存 2FBA退货入库单-退货库存
     */
    @TableField("claim_type")
    private Integer claimType;

    /**
     * 暂存库位
     */
    @TableField("temporary_cell")
    private Long temporaryCell;

    /**
     * 状态
     */
    @TableField("status")
    private Integer status;

    /**
     * 备注图片
     */
    @TableField("file_ids")
    private String fileIds;

    /**
     * 认领时间
     */
    @TableField("claim_time")
    private Date claimTime;

    /**
     * 失效时间
     */
    @TableField("expire_time")
    private Date expireTime;

    /**
     * 取消时间
     */
    @TableField("cancel_time")
    private Date cancelTime;

    /**
     * 创建时间
     */
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private Date createTime;

    /**
     * 创建人
     */
    @TableField(value = "create_by", fill = FieldFill.INSERT)
    private Long createBy;

    @TableField(value = "create_by_name", fill = FieldFill.INSERT)
    private String createByName;

    /**
     * 备注
     */
    @TableField("remark")
    private String remark;

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
